-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resize only with ctrl #705
base: master
Are you sure you want to change the base?
Conversation
oops, apparently this also has the ng fix in there toooooo...best course of action @tbekolay ? |
You can either rebase this branch to master, or you can just note that this branch is based on #704 and should be merged first. |
done! thanks! |
Hmm... for me (on Chromium), once I touch Ctrl I can no longer resize any of the components. It's like the keyup never happens at all. Does that happen to you? |
hmm nope it clicks back as soon as i let go, i'm using Google Chrome 49.0.2623.87 on ubuntu 14.04 |
} | ||
}); | ||
$(document).bind('keyup', function(event) { | ||
interact(self.div).resizable(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be inside an if (event.ctrlKey)
check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it should!
Weird... It's failing for me on Chrome 44.0.2403.107 as well... And firefox 36.0.4... (on Mint 17) those are both old versions, but still, everything else works on them.... I'll poke around on other machines... |
hmm yeah i'm on my workstation now and getting some weird behaviour from this. i'll double check things on my laptop when i'm back home tonight... |
looks like it should be checking the |
That fixes it for me on Chrome and Firefox :) One small thing: could there be a comment added to indicate that keyCode===17 is the ctrl button? |
comment added! |
Cool.... and one more thing -- it should probably be added to the hotkeys text. :) |
hmmmm how would you describe this? Temporarily disable resize? Easy move? ...?? |
Hmm... I think just "Disable resize..............Ctrl" should be okay.... |
k! On Tue, Mar 22, 2016 at 3:55 PM, tcstewar [email protected] wrote:
|
added! |
Use self-documenting code instead of comment. Be consistent in use of key codes instead of ctrlKey flag.
Added a commit to use self-documenting code instead of comments and to be consistent with the use of key codes (instead of the |
Tested and confirmed it still works in Chrome. |
Just added an event handler for items that checks the key pressed, if it's ctrl then it sets 'resizable' to false, and then back to true when the key is let up. The idea is just to make it easier to move around items. I've often had it when an ensemble or whatnot is small and I can't click on it to move without zooming in, i'm only able to resize. So this addresses that!
Addresses #625, uses ctrl instead of alt because alt is a thing in chrome.
Based on #704, which should be merged first!